function hst = analogTrans(hs, old_freq, trans_type, new_freq)
  select trans_type
    case 'lp' then
      hst = polyval(hs, old_freq/new_freq(1)*%s);
    case 'hp' then
      hst = polyval(hs, old_freq*new_freq(1)/%s);
    case 'bp' then
      hst = polyval(hs, old_freq*(%s^2 + new_freq(1)*new_freq(2))/(%s*(new_freq(2)-new_freq(1))));
    case 'bs' then
      hst = polyval(hs, old_freq*%s*(new_freq(2)-new_freq(1))/(%s^2+new_freq(2)*new_freq(1)));
    else
      error("filter type must be string lp, hp, bp or bs");
end
endfunction

      
  
  
